/*
 ***************************************************************************
 * MediaTeK Inc.
 * 4F, No. 2 Technology	5th	Rd.
 * Science-based Industrial	Park
 * Hsin-chu, Taiwan, R.O.C.
 *
 * (c) Copyright 2002-2012, MTK.
 *
 * All rights reserved.	MediaTeK's source	code is	an unpublished work	and	the
 * use of a	copyright notice does not imply	otherwise. This	source code
 * contains	confidential trade secret material of MediaTeK Tech. Any attemp
 * or participation	in deciphering,	decoding, reverse engineering or in	any
 * way altering	the	source code	is stricitly prohibited, unless	the	prior
 * written consent of MediaTeK, Inc. is obtained.
 ***************************************************************************

	Module Name:
	omci_me_voip.h

	Abstract:

	Revision History:
	Who			When			What
	--------	----------		----------------------------------------------
	Name		Date			Modification logs
	wayne.lee	2013/9/26	Create
*/

#ifndef  _OMCI_VOIP_ME_H_
#define _OMCI_VOIP_ME_H_
#include "omci_adpt_common.h"

/*******************************************************************************************************************************
defined
********************************************************************************************************************************/
enum omciVoipStatus {
	OMCI_VOIP_FAIL = -1,
	OMCI_VOIP_SUCC = 0,	
	OMCI_VOIP_NO_FIND =1,
	OMCI_VOIP_FIND = 2,
	OMCI_VOIP_CHANGE_ENTRY = 3,
	OMCI_VOIP_NO_CHANGE_ENTRY = 4
};

enum omciVoipParaEnable{
	OMCI_VOIP_PARA_DISABLE = 0,
	OMCI_VOIP_PARA_ENABLE = 1
};

typedef struct callHistory_s {
    char date[8];
    char time[8];
    int32_t callDuration;
    char calledNumber[25];
    char callingNumber[25];
    int32_t RTPTxPackets;
    int32_t RTPRxPackets;
    int32_t RTPRxPacketsLost;
    int32_t RTPPacketsDiscards;
    int32_t RTPOverruns;
    int32_t RTPUnderruns;
    int32_t AverageJitter;
    uint8_t RTCPParticipation;
    int32_t PeakJitter;
    int32_t AverageJitterBufferDepth;
    uint8_t RTCP_XRParticipation;
    int32_t AverageMOS;
    int32_t PeakRoundTripDelay;
    int32_t AverageRoundTripDelay;
}callHistory_t,*callHistory_ptr;

/*POTS test reslut offset defination*/
#define OFS_MLT_RESULT              0
#define OFS_SELF_VEND_TEST          1
#define OFS_MAKE_BREAK_FLAGS        2
#define OFS_POWER_FLAGS             3
#define OFS_LOOP_DC_FLAGS           4
#define OFS_LOOP_AC_FLAGS           5
#define OFS_LOOP_R_FLAGS_1          6
#define OFS_LOOP_R_FLAGS_2          7
#define OFS_TIME_DRAW               8
#define OFS_TIME_BREAK              9
#define OFS_DIAL_TONE_MEAS          10
#define OFS_CHANNEL_MEAS            11
#define OFS_TG_DC                   12
#define OFS_RG_DC                   14
#define OFS_TG_AC                   16
#define OFS_RG_AC                   17
#define OFS_TG_DC_R                 18
#define OFS_RG_DC_R                 20
#define OFS_TR_DC_R                 22
#define OFS_RINGER                  24
#define OFS_POINTER_PURPOSE         25
#define OFS_TR_V_FLAGS              27
#define OFS_TR_AC                   28
#define OFS_TR_DC                   29

/*Slic Verdor defination*/
#define Zarlink 1
#define Silicon 2

/*POTS test defination*/
#define ALL_MLT         0x00
#define HIGH_VOLTAGE    0x01
#define EMF             0x02
#define RESISTANCE      0x03
#define OFF_HOOK        0x04
#define RINGER          0x05
#define SELF_TEST       0x07
#define DIAL_TONE       0x08


#define OMCI_TCAPI_GET_ACTION			0
#define OMCI_TCAPI_SET_ACTION			1

#define OMCI_ME_DEFAULT_STR_ATTR_LEN	32
#define OMCI_ME_MAX_STR_ATTR_LEN		25
#define OMCI_ME_MAX_LARGE_STR_PART_NUM	15

/*0:fxs1,1:fxs2,2:fxo*/

#define OMCI_VOIP_BASIC       "VoIPBasic"
#define OMCI_VOIP_ADVANCED    "VoIPAdvanced"
#define OMCI_VOIP_BASIC_ENTRY "VoIPBasic_Entry"
#define OMCI_VOIP_BASIC_COMMON "VoIPBasic_Common"
#define OMCI_VOIP_ADVANCED_ENTRY "VoIPAdvanced_Entry"
#define OMCI_VOIP_ADVANCED_COMMON "VoIPAdvanced_Common"

#define OMCI_VOIP_CODECS_PVC_ENTRY "VoIPCodecs_PVC0_Entry"
#define OMCI_VOIP_CODECS_PVC "VoIPCodecs_PVC"

#define OMCI_VOIP_MEDIA_COMMON "VoIPMedia_Common"
#define OMCI_VOIP_MEDIA_ENTRY "VoIPMedia_Entry"

#define OMCI_VOIP_H248_ENTRY	"VoIPH248_Entry"
#define OMCI_VOIP_H248_COMMON	"VoIPH248_Common"

#define OMCI_VOIP_SYS_PARAM_ENTRY	"VoIPSysParam_Entry%d"
#define OMCI_VOIP_INFO_H248_ENTRY	"InfoVoIPH248_Entry%d"


#define OMCI_VOIP_DIGIT_MAP_ENTRY	"VoIPDigitMap_Entry"

#define OMCI_VOIP_ATTR_ENABLE_NAME	"1"
#define OMCI_VOIP_ATTR_DISABLE_NAME	"0"

/*9.9.1 PPTP ports UNI*/
#define OMCI_PPTP_UNI_STATE_UNLOCK  0
#define OMCI_PPTP_UNI_STATE_LOCK    1

/*9.9.2 sip user data*/
#define OMCI_MAX_SIP_DISP_NAME_LEN	24
#define OMCI_SIP_DISP_NAME_ATTR_LEN	25
#define OMCI_REGISTER_EXPIRERS_ATTR_LEN	4

#define OMCI_SIP_DISP_NAME		"SIPDisplayName"
#define OMCI_SIP_USER_PART_AOR	"SIPUserPartAor"
#define OMCI_SIP_AUTH_USER_NAME	"SIPAuthenticationName"
#define OMCI_SIP_PASSWORD		"SIPPassword"
#define OMCI_SIP_VOICEMAIL_EXPIRE	"SIPVoicemailExpire"
#define OMCI_SIP_URI			"URI"

/*******************************************************************************************************************************
9.9.3 SIP agent config data

********************************************************************************************************************************/
#define VOIP_SIP_STATUTS_OK_INITIAL                 0
#define VOIP_SIP_STATUTS_CONNECTED                  1
#define VOIP_SIP_STATUTS_FAIL_ICMP_ERROR            2
#define VOIP_SIP_STATUTS_FAIL_MALFORMED_RES         3
#define VOIP_SIP_STATUTS_FAIL_INADEQUATE_INFO_RES   4
#define VOIP_SIP_STATUTS_FAIL_TIMEOUT               5
    
#define VOIP_SIP_SZ_STATUTS_OK_INITIAL                 "Ok/initial"
#define VOIP_SIP_SZ_STATUTS_CONNECTED                  "Connected"
#define VOIP_SIP_SZ_STATUTS_FAIL_ICMP_ERROR            "Failed-ICMP error"
#define VOIP_SIP_SZ_STATUTS_FAIL_MALFORMED_RES         "Failed-Malformed response"
#define VOIP_SIP_SZ_STATUTS_FAIL_INADEQUATE_INFO_RES   "Failed-Inadequate info response"
#define VOIP_SIP_SZ_STATUTS_FAIL_TIMEOUT               "Failed-Timeout"

#define VOIP_SIP_TR69_SZ_STATUS_UP              "Up"
#define VOIP_SIP_TR69_SZ_STATUS_INITING         "Initializing"
#define VOIP_SIP_TR69_SZ_STATUS_REGING          "Registering"
#define VOIP_SIP_TR69_SZ_STATUS_UNREGING        "Unregistering"
#define VOIP_SIP_TR69_SZ_STATUS_ERROR           "Error"
#define VOIP_SIP_TR69_SZ_STATUS_TESTING         "Testing"
#define VOIP_SIP_TR69_SZ_STATUS_QUIESCENT       "Quiescent"
#define VOIP_SIP_TR69_SZ_STATUS_DISABELED       "Disabled"

typedef enum omciVoipAttrType{
	OMCI_VOIP_ATTR_REGISTER = 0,
	OMCI_VOIP_ATTR_PROXY = 1,
	OMCI_VOIP_ATTR_OUTBOUND = 2,
}omciVoipAttrType;

/*9.9.5 VoIP media profile*/
#define OMCI_MEDIA_1ST	0
#define OMCI_MEDIA_2ND	1
#define OMCI_MEDIA_3RD	2
#define OMCI_MEDIA_4TH	3
#define OMCI_MEDIA_NUM  4

#define OMCI_FAX_MODE_PASSTHRU	0
#define OMCI_FAX_MODE_T38		1
#define OMCI_FAX_CODEC_NAME		"FaxCodec"
#define OMCI_FAX_CODEC_T38		"T38"
#define OMCI_FAX_CODEC_PCMA		"PCMA"
#define OMCI_FAX_CODEC_PCMU		"PCMU"

#define OMCI_MEDIA_CODEC_PCMU	0
/*G726-32 --reserved(1)*/
#define OMCI_MEDIA_CODEC_G726	1
#define OMCI_MEDIA_CODEC_G723	4
#define OMCI_MEDIA_CODEC_PCMA	8
#define OMCI_MEDIA_CODEC_G722	9
#define OMCI_MEDIA_CODEC_G729	18
#define OMCI_MEDIA_SIPSUPPORTED_CODECS_PCMA		"G.711 a-law"
#define OMCI_MEDIA_SIPSUPPORTED_CODECS_PCMU		"G.711 u-law"
#define OMCI_MEDIA_SIPSUPPORTED_CODECS_G722		"G.722"
#define OMCI_MEDIA_SIPSUPPORTED_CODECS_G723		"G.723"
#define OMCI_MEDIA_SIPSUPPORTED_CODECS_G726		"G.726"
#define OMCI_MEDIA_SIPSUPPORTED_CODECS_G726_32	"G.726 - 32"
#define OMCI_MEDIA_SIPSUPPORTED_CODECS_G726_24	"G.726 - 24"
#define OMCI_MEDIA_SIPSUPPORTED_CODECS_G729		"G.729"

#define OMCI_MEDIA_CODEC_NAME					"codec"
#define OMCI_MEDIA_PRIORITY                     "priority"
#define OMCI_MEDIA_ENABLE                       "Enable"
#define OMCI_MEDIA_SIP_PACKETIZATION_TIME_NAME	"SIPPacketizationTime"
#define OMCI_MEDIA_SILENCE_SUPPRESSION_NAME		"SilenceSuppression"
#define OMCI_MEDIA_SILENCE_COMPRESSIONENABLE    "SilenceCompressionEnable"

#define OMCI_MEDIA_711APTIME_NAME	"711APTime"
#define OMCI_MEDIA_711UPTIME_NAME	"711UPTime"
#define OMCI_MEDIA_729PTIME_NAME	"729PTime"
#define OMCI_MEDIA_726PTIME_NAME	"726-32PTime"
#define OMCI_MEDIA_722PTIME_NAME	"722PTime"

#define MIN_OMCI_MEDIA_PKT_PERIOD_VAL	10
#define MAX_OMCI_MEDIA_PKT_PERIOD_VAL	30

#define OMCI_MEDIA_SILENCE_OFF	0
#define OMCI_MEDIA_SILENCE_ON	1
#define OMCI_MEDIA_VAD_OFF_VAL	"0"
#define OMCI_MEDIA_VAD_ON_VAL	"1"
#define OMCI_MEDIA_SILENCE_DISABLE	"No"
#define OMCI_MEDIA_SILENCE_ENABLE   "Yes"

#define OMCI_MEDIA_DTMF_MODE_NAME	"DTMFTransportMode"
#define OMCI_MEDIA_DTMF_MODE_INBAND	"Inband"
#define OMCI_MEDIA_DTMF_MODE_RFC2833	"RFC2833"


/*9.9.8 VOIP app service profile*/
#define LARGE_STRING_MAX_SIZE  375

#define OMCI_VOIP_APP_SVC_PRO_DISABLE	"No"
#define OMCI_VOIP_APP_SVC_PRO_ENABLE  "Yes"

#define OMCI_VOIP_APP_SVC_PRO_CID_DISABLE "0"
#define OMCI_VOIP_APP_SVC_PRO_CID_ENABLE  "2"

#define OMCI_VOIP_APP_SVC_PRO_VDISABLE	"0"
#define OMCI_VOIP_APP_SVC_PRO_VENABLE  "1"

#define OMCI_VOIP_CALLERID_ENABLE   	"SIPCallerIdEnable"
#define OMCI_VOIP_CALL_WAITING_ENABLE   "SIPCallWaitingEnable"
#define OMCI_VOIP_THREE_WAY_CONF  	"SIP3wayConf"
#define OMCI_VOIP_CALL_TRANSFER  	"SIPCallTransfer"
#define OMCI_VOIP_DND_ENABLE  		"SIPDNDEnable"
#define OMCI_VOIP_HOT_LINE_ENABLE  	"HotLineEnable"
#define OMCI_VOIP_HOT_LINE_DELAY_TIME  	"HotLineDelayTime"
#define OMCI_VOIP_HOT_LINE_NUMBER  	"HotLineNumber"

#define OMCI_VOIP_CALL_CTRL_ENTRY  	"VoIPCallCtrl_Entry"


/*9.9.11 VoIP line status*/
#define OMCI_VOIP_LINE_USED_CODEC             1
typedef enum {
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_IDLE = 0,
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_OFF,
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_DIALLING,
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_RINGING,
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_RINGBACK,
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_CONNECTING,	
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_CONNECTED,
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_DISCONNECT,
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_NO_TONE,
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_WITH_TONE,
	OMCI_VOIP_LINE_HOOK_STATE_TYPE_UNKNOWN,
}omci_voip_line_state_t;

typedef enum {
	OMCI_VOIP_SERVER_STATUS_INITIAL = 0,
	OMCI_VOIP_SERVER_STATUS_REGISTERED = 1,
	OMCI_VOIP_SERVER_STATUS_IN_SESSION = 2,
	OMCI_VOIP_SERVER_STATUS_FAILED = 5,
	OMCI_VOIP_SERVER_STATUS_NOTCONFIG = 13,
}omci_voip_ser_status_t;

typedef enum {
	OMCI_VOIP_PORT_SESSION_TYPE_IDLE = 0,
	OMCI_VOIP_PORT_SESSION_TYPE_2WAY = 1,
	OMCI_VOIP_PORT_SESSION_TYPE_3WAY = 2,
	OMCI_VOIP_PORT_SESSION_TYPE_FAX = 3,
	OMCI_VOIP_PORT_SESSION_TYPE_TELEMETRY = 4,
	OMCI_VOIP_PORT_SESSION_TYPE_CONFERENCE = 5,
}omci_voip_port_ses_type_t;

typedef enum {
	OMCI_VOIP_CALL_PACKET_PERIOD_ONE = 1,
	OMCI_VOIP_CALL_PACKET_PERIOD_TWO = 2,
}omci_voip_pkt_period_t;

typedef enum {
	VOIP_DEVICE_IDLE = 1,
	VOIP_DEVICE_BUSY,
}omci_voip_dev_status_t;


/*9.9.16 MGC config data*/
#define OMCI_H248_PRIMARY_ATTR_INDEX 				1
#define OMCI_H248_SECNDARY_ATTR_INDEX 				2

#define OMCI_H248_PRIMARY_MGC_IP_NAME		"MediaGatewayControler"
#define OMCI_H248_PRIMARY_MGC_PORT_NAME		"MediaGatewayControlerPort"
#define OMCI_H248_SECONDARY_MGC_IP_NAME		"SBMediaGatewayControler"
#define OMCI_H248_SECONDARY_MGC_PORT_NAME	"SBMediaGatewayControlerPort"

#define OMCI_H248_DEVICE_ID_NAME			"DeviceID"

#define OMCI_H248_MSG_FORMAT_NAME	"MsgFormat"
#define OMCI_H248_MSG_FORMAT_TEXT_LONG	0
#define OMCI_H248_MSG_FORMAT_TEXT_SHORT	1
#define OMCI_H248_MSG_FORMAT_BINARY  	2
#define OMCI_H248_MSG_FORMAT_TEXT_LONG_VAL	"Long"
#define OMCI_H248_MSG_FORMAT_TEXT_SHORT_VAL	"Short"

#define OMCI_H248_DEFAULT_MAX_RETRANS_TIME	3
#define OMCI_H248_MAX_RETRANS_TIME_NAME	"MaxreTransTime"

/*9.9.18 VoIP config data*/
#define OMCI_VOIP_CFG_DATA_SIGNALING_PROTOCOLS_NAME	"SignalingProtocols"
#define OMCI_VOIP_CFG_DATA_SIGNALING_PROTOCOLS_NONE		0
#define OMCI_VOIP_CFG_DATA_SIGNALING_PROTOCOLS_SIP		(1<<0)
#define OMCI_VOIP_CFG_DATA_SIGNALING_PROTOCOLS_H248		(1<<1)
#define OMCI_VOIP_CFG_DATA_SIGNALING_PROTOCOLS_MGCP		(1<<2)

#define OMCI_VOIP_CFG_DATA_SIGNALING_PROTOCOLS_SIP_VAL	"SIP"
#define OMCI_VOIP_CFG_DATA_SIGNALING_PROTOCOLS_H248_VAL	"H.248"
#define OMCI_VOIP_CFG_DATA_SIGNALING_PROTOCOLS_MGCP_VAL	"MGCP"

#define OMCI_VOIP_CFG_DATA_VOIP_CFG_METHOD_OMCI			(1<<0)
#define OMCI_VOIP_CFG_DATA_VOIP_CFG_METHOD_FILE			(1<<1)
#define OMCI_VOIP_CFG_DATA_VOIP_CFG_METHOD_TR69			(1<<2)
#define OMCI_VOIP_CFG_DATA_VOIP_CFG_METHOD_IETF			(1<<3)

#define OMCI_VOIP_CFG_DATA_PROTOCOLS_USED_NAME		"ServerType"
#define OMCI_VOIP_CFG_DATA_PROTOCOLS_USED_NONE		0
#define OMCI_VOIP_CFG_DATA_PROTOCOLS_USED_SIP		1
#define OMCI_VOIP_CFG_DATA_PTOCOLS_USED_H248		2
#define OMCI_VOIP_CFG_DATA_PROTOCOLS_USED_MGCP		3
#define OMCI_VOIP_CFG_DATA_PROTOCOLS_USED_NO_OMCI	0xFF

#define OMCI_VOIP_CFG_DATA_PROFILE_VERSION_NAME		"Name"

#define OMCI_VOIP_CFG_DATA_CFG_METHOD_NAME		"VoIPConfig"
#define OMCI_VOIP_CFG_DATA_CFG_METHOD_NOT_USED		0
#define OMCI_VOIP_CFG_DATA_CFG_METHOD_USED_OMCI		1
#define OMCI_VOIP_CFG_DATA_CFG_METHOD_USED_TR69		3

#define OMCI_VOIP_CFG_DATA_CFG_METHOD_NOTCFG_VAL	"NotCfg"
#define OMCI_VOIP_CFG_DATA_CFG_METHOD_OMCI_VAL	"OMCI"
#define OMCI_VOIP_CFG_DATA_CFG_METHOD_TR69_VAL	"TR69"

/*9.9.10 network dial plan table*/
#define OMCI_VOIP_NET_DIAL_PLAN_TBL_FORMAT_NO_DEFINED	0
#define OMCI_VOIP_NET_DIAL_PLAN_TBL_FORMAT_H248			1
#define OMCI_VOIP_NET_DIAL_PLAN_TBL_FORMAT_NSC			2
#define OMCI_VOIP_NET_DIAL_PLAN_TBL_FORMAT_VENDOR		3

#define OMCI_VOIP_NET_DIAL_PLAN_TBL_RECORD_LEN			30
#define OMCI_VOIP_NET_DIAL_PLAN_TBL_ADD_ACTION			1
#define OMCI_VOIP_NET_DIAL_PLAN_TBL_DEL_ACTION			0

/*9.9.13 RTP PM*/
#define RTP_TIMESTAMP_UNIT 		80
#define MAX_BUFFER_SIZE 		64

#define VOIP_MAX_CHAN_NUM 2 
#define VOICE_IAD_ERROR      1
#define VOICE_ROUTE_ERROR    2
#define VOICE_RESPONSE_ERROR 3
#define VOICE_USER_PW_ERROR  4
#define VOICE_UNKNOWN_ERROR  5



/*******************************************************************************************************************************
general function

********************************************************************************************************************************/
int getEntryIdBySipUserData(uint16_t instId, uint16_t *entryId);
int setSipDispName(char * val, uint16_t entryId);
int setSipUserPass(uint16_t instId, uint16_t entryId);
int setSipURI(uint16_t instId, uint16_t entryId);
int updateSipInfoByPPTP(uint16_t instId,uint16_t entryId);
int setSipUserPartAOR(char * val, uint16_t entryId);


int setPptpPotsUNIARCValue(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getPptpPotsUNIAdminStatus(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setPptpPotsUNIAdminStatus(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getPptpPotsUNIRxGain(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setPptpPotsUNIRxGain(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getPptpPotsUNITxGain(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setPptpPotsUNITxGain(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getPptpPotsUNIHookState(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int omci_me_pptp_pots_uni_test_op(management_entry_ptr me_entry, omci_me_info_ptr me_info);

int setSipUserDataUserPartAOR(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getSipUserDataDispName(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipUserDataDispName(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipUserDataUserPass(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipUserDataSipURI(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getSipUserDataExpTime(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipUserDataExpTime(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipUserDataPPTPPointer(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int omci_me_sip_user_data_del_op(management_entry_ptr me_entry, omci_me_info_ptr me_info);
int omci_me_sip_user_data_create_op(management_entry_ptr me_entry, omci_me_info_ptr me_info);

int setSipAgentCfgDataProxyAddr(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipAgentCfgDataOutBoundProxyAddr(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getSipAgentCfgDataSipRegExpTime(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipAgentCfgDataSipRegExpTime(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getSipAgentCfgDataSIPReregTime(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipAgentCfgDataSIPReregTime(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getSipAgentCfgDataSIPStatus(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipAgentCfgDataSIPRegistrar(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipAgentCfgDataTcpUdp(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setSipAgentCfgDataHostPartUri(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int omci_me_sip_agent_cfg_del_op(management_entry_ptr me_entry, omci_me_info_ptr me_info);
int omci_me_sip_agent_cfg_create_op(management_entry_ptr me_entry, omci_me_info_ptr me_info);

int getVOIPMediaProFaxMode(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProFaxMode(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProCodecSele1st(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProCodecSele1st(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProPktPeriodSele1st(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProPktPeriodSele1st(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProSlience1st(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProSlience1st(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProCodecSele2nd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProCodecSele2nd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProPktPeriodSele2nd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProPktPeriodSele2nd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProSlience2nd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProSlience2nd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProCodecSele3rd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProCodecSele3rd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProPktPeriodSele3rd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProPktPeriodSele3rd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProSlience3rd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProSlience3rd(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProCodecSele4th(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProCodecSele4th(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProPktPeriodSele4th(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProPktPeriodSele4th(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProSlience4th(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProSlience4th(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPMediaProOOBDtmf(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPMediaProOOBDtmf(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);

int getNetDialPlanTblDialNumber(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setNetDialPlanTblDialFormat(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setNetDialPlanTblDialTbl(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);

int setMGCCfgDataPriMGC(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setMGCCfgDataSecMGC(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getMGCCfgDataDevId(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setMGCCfgDataDevId(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);

int getVOIPCfgDataAvaiProto(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPCfgDataProtoUsed(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPCfgDataProtoUsed(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPCfgDataAvaVoipCfgMethods(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setVOIPCfgDataMethodsUsed(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVOIPCfgDatProVersion(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);

int getVoIPStatusDataCodecsUsed(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVoIPLineStatusVoiceServerStatus(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVoIPLineStatusPortSessionType(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVoIPLineStatusCall1PacketPeriod(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVoIPLineStatusCall2PacketPeriod(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int getVoIPLineState(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);

int setvoipAppSvcProCIDFeatures(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setvoipAppSvcProDirectConnectFeature(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);
int setvoipAppSvcProDirectConnectURIPointer(omci_me_info_ptr me_info, omci_attr_dscp_ptr omci_attr);



//extern 
extern omci_attr_dscp_t omci_attr_pptp_pots_uni_op[];
extern omci_me_func_t omci_me_pptp_pots_uni_op;
extern omci_attr_t omci_pptp_pots_uni_attr;

extern omci_attr_dscp_t omci_attr_sip_user_data_op[];
extern omci_me_func_t omci_me_sip_user_data_op;
extern omci_attr_t omci_sip_user_data_attr;

extern omci_attr_dscp_t omci_attr_sip_agent_cfg_op[];
extern omci_me_func_t omci_me_sip_agent_cfg_op;
extern omci_attr_t omci_sip_agent_cfg_attr;

extern omci_attr_dscp_t omci_attr_voip_voice_ctp_op[];
extern omci_me_func_t omci_me_voip_voice_ctp_op;
extern omci_attr_t omci_voip_voice_ctp_attr;

extern omci_attr_dscp_t omci_attr_voip_media_prof_op[];
extern omci_me_func_t omci_me_voip_media_prof_op;
extern omci_attr_t omci_voip_media_prof_attr;

extern omci_attr_dscp_t omci_attr_voice_srv_prof_op[];
extern omci_me_func_t omci_me_voice_srv_prof_op;
extern omci_attr_t omci_voice_srv_prof_attr;

extern omci_attr_dscp_t omci_attr_rtp_prof_op[];
extern omci_me_func_t omci_me_rtp_prof_op;
extern omci_attr_t omci_rtp_prof_attr;

extern omci_attr_dscp_t omci_attr_voip_app_srv_prof_op[];
extern omci_me_func_t omci_me_voip_app_srv_prof_op;
extern omci_attr_t omci_voip_app_srv_prof_attr;

extern omci_attr_dscp_t omci_attr_net_dial_plan_tab_op[];
extern omci_me_func_t omci_me_net_dial_plan_tab_op;
extern omci_attr_t omci_net_dial_plan_tab_attr;

extern omci_attr_dscp_t omci_attr_voip_line_status_op[];
extern omci_me_func_t omci_me_voip_line_status_op;
extern omci_attr_t omci_voip_line_status_attr;

extern omci_attr_dscp_t omci_attr_call_ctl_pm_hist_op[];
extern omci_me_func_t omci_me_call_ctl_pm_hist_op;
extern omci_attr_t omci_call_ctl_pm_hist_attr;

extern omci_attr_dscp_t omci_attr_rtp_pm_hist_op[];
extern omci_me_func_t omci_me_rtp_pm_hist_op;
extern omci_attr_t omci_rtp_pm_hist_attr;

extern omci_attr_dscp_t omci_attr_sip_agent_pm_hist_op[];
extern omci_me_func_t omci_me_sip_agent_pm_hist_op;
extern omci_attr_t omci_sip_agent_pm_hist_attr;

extern omci_attr_dscp_t omci_attr_sip_call_init_pm_hist_op[];
extern omci_me_func_t omci_me_sip_call_init_pm_hist_op;
extern omci_attr_t omci_sip_call_init_pm_hist_attr;

extern omci_attr_dscp_t omci_attr_sip_call_init_pm_hist_op[];
extern omci_me_func_t omci_me_sip_call_init_pm_hist_op;
extern omci_attr_t omci_sip_call_init_pm_hist_attr;

extern omci_attr_dscp_t omci_attr_mgc_cfg_data_op[];
extern omci_me_func_t omci_me_mgc_cfg_data_op;
extern omci_attr_t omci_mgc_cfg_data_attr;

extern omci_attr_dscp_t omci_attr_voip_cfg_data_op[];
extern omci_me_func_t omci_me_voip_cfg_data_op;
extern omci_attr_t omci_voip_cfg_data_attr;

int omci_me_call_ctrl_pm_history_notify(pm_history_data_list_ptr pm_list, omci_me_info_t threshold_info);
int omci_me_rtp_pm_history_notify(pm_history_data_list_ptr pm_list, omci_me_info_t threshold_info);
int omci_me_sip_agent_pm_history_notify(pm_history_data_list_ptr pm_list, omci_me_info_t threshold_info);
int omci_me_sip_call_init_pm_history_notify(pm_history_data_list_ptr pm_list, omci_me_info_t threshold_info);


int get_call_ctrl_pm_history_data(pm_history_data_list_ptr pm_list, uint8_t syncFlag);
int get_rtp_pm_history_data(pm_history_data_list_ptr pm_list, uint8_t syncFlag);
int get_sip_agent_pm_history_data(pm_history_data_list_ptr pm_list, uint8_t syncFlag);
int get_sip_call_init_pm_history_data(pm_history_data_list_ptr pm_list, uint8_t syncFlag);



#endif

